import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import './assets/css/global.css'
import './assets/fonts/iconfont.css'

import 'element-plus/dist/index.css'
import './assets/main.css'
import ElementPlus from 'element-plus'

import axios from 'axios'
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
// 设置请求拦截器
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

const app = createApp(App)

app.use(router)
app.use(ElementPlus)
app.config.globalProperties.$http = axios

app.mount('#app')
